<style>
#VIEW-login{
    height: 100%;
    background:#252834;
    padding-top:1px;
    margin-top:-1px;
}
#VIEW-login .layui-logo{
    user-select: none;
    overflow: hidden;
    position: static;
    font-size: 30px;
    color:#d6e0f6;
    width: 100%;
    padding:0;
    line-height: 120px;
    height: 120px;
    color:#3491ff;
    font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
    transition: height .8s cubic-bezier(0.075, 0.82, 0.165, 1);
}
#VIEW-login .layui-logo span{
    font-weight: normal;
    color:#fff;
}
#VIEW-login .layui-logo span b{
    color:#3491ff;
}


#VIEW-login .login-wrap{
    position: relative;
    top:50%;
    margin-top:-290px;
    height: 540px;
}

#VIEW-login .layui-form{
    overflow: hidden;
    background: rgba(0,0,0,.5);
    padding-bottom:20px;
    border-radius: 0px;
    position: relative;
}
#VIEW-login .layui-form-item{
    position: relative;
}
#VIEW-login .verify-block{
    display: none;
}
#VIEW-login .layui-input{
    text-indent:26px;
}

#VIEW-login .codeimg{
    margin-left: 10px;
    cursor: pointer;
}
#VIEW-login .sendsms{
    position: absolute;
    top:4px;
    right: 4px;
    width: 100px;
    border:none;
}
#VIEW-login .sendsms.layui-btn-disabled{
    background: #f4f4f4;
    color:#bbb;
}
#VIEW-login .houseimg{
    text-align: center;
}
#VIEW-login .houseimg img{
    display: inline-block;
    margin-top:5%;
}

#VIEW-login .login-type-tab{
    margin-bottom: 20px;
    overflow: hidden;
}
#VIEW-login .login-type-tab li{
    display: inline-block;
    padding-right: 20px;
    font-size: 16px;
    line-height: 30px;
    color:#bbb;
    cursor: pointer;
    transition: color .5s ease;
}
#VIEW-login .login-type-tab li.active{
    color:#333;
}
#VIEW-login .login-type-tab li .qrcode-icon{
    font-size: 24px;
}
#VIEW-login .phonecode-block{
    display: none;
}
#VIEW-login .qrcode-block{
    text-align: center;
    display: none;
}

#VIEW-login .qrcode-block .qrcode{
    border:1px solid #eee;
    display: inline-block;
    padding:15px;
    margin:30px 0;
    width: 158px;
    height: 158px;
}

#VIEW-login .qrcode-block .qrcode .layui-icon{
    line-height: 158px;
    font-size: 44px;
    color:#e6e6e6;
}
#VIEW-login .qrcode-block .p1{
    font-size: 16px;
}
#VIEW-login .qrcode-block .p2{
    font-size: 14px;
    color:#999;
    margin-top:10px;
    margin-bottom: 20px;
}
#VIEW-login .layui-form-item .label-icon{
    position: absolute;
    top:10px;
    left:10px;
    width: 38px;
    line-height: 38px;
    text-align: center;
    color: #fff !important;
	font-size: 30px;
}
.hlayui-input{
	background: none;
	border: none;
	border-bottom: 1px solid #ccc;
	padding: 16px 60px;
	width: 100%;
	box-sizing: border-box;
	font-size: 20px;
	color:#fff;
}
.iwechat{
	width: 30px;
	height: 30px;
	position: absolute;
	right: 5px;
	bottom: 5px;
}
.lcheck .layui-form-checkbox{
	background: none !important;margin-left: 20px;
}
.lcheck .layui-form-checkbox span{
	color: #fff;
}
</style>
<div id="VIEW-login" lay-title="登录" style="background: url(hxradmin/images/login-bg.png); background-size: 100% 100%;">
    <div class="login-wrap">
        <div class="layui-container">
            <div class="layui-row">
                <div class="layui-col-xs12 layui-col-lg4 layui-col-lg-offset4 nepadmin-tc">
                    <div class="layui-logo"><span><!-- Ne<b>pA</b>dmin -->火星国度管理后台</span></div>
                </div>
                <div class="layui-col-xs12 layui-col-lg4 layui-col-lg-offset4">
                    <div class="layui-form" lay-filter="login-form">
                        <!-- <ul class="login-type-tab">
                            <li login-type="password" class="active">账号密码登录</li>
                        </ul> -->
						
                        <div class="normal-login-form">
                            <div class="layui-form-item" style="margin: 0;">
                                <label class="layui-icon label-icon layui-icon-friends"></label>
                                <!-- <input type="text" name="username" value="13300000000" lay-verify="phone" lay-verType="tips" placeholder="手机号码" maxlength="11" autocomplete="off" class="layui-input"> -->
								<input type="text" name="username" lay-verType="tips" lay-verify="required|username" autocomplete="off" class="hlayui-input">
							</div>
                            <div class="layui-form-item password-block">
                                <!-- <label class="layui-icon label-icon layui-icon-password"></label> -->
								<img src="hxradmin/images/pwd.png" class="layui-icon label-icon" style="width: 36px;height: 36px; left: 12px;">
                                <input type="password" name="password" lay-verify="password" lay-verType="tips" autocomplete="off" class="hlayui-input">
                            </div>
							<!-- <div class="layui-form-item lcheck">
							    <input type="checkbox" name="autoLogin" title="保持登录" lay-skin="primary" checked>
							</div> -->
                            <div class="layui-form-item" style="margin: 30px auto; width: 90%;">
                                <button class="layui-btn layui-btn-normal layui-btn-fluid" lay-submit lay-filter="login-submit" style="line-height: 46px;height: 46px;">
                                    <i style="display: none" class="layui-icon layui-icon-loading layui-icon layui-anim layui-anim-rotate layui-anim-loop"></i>
                                    立即登录
                                </button>
                            </div>
							<!-- <img class="iwechat" src="hxradmin/images/wechat.png" > -->
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
layui.use(['admin','form'],function(admin,form){
    var $ = layui.jquery;
    var view = $('#VIEW-login');
	var currentLoginType = 'password';
    form.verify(layui.admin.verify);
    form.render();
    //提交登录表单
    form.on('submit(login-submit)',function(data){
        /* var loading = $(this).find('.layui-icon');
        if(loading.is(":visible")) return; */
        //loading.show();
		layui.admin.ajax('login/sign_in',{
			username:data.field.username,
			password:data.field.password
		}).then(function(res){
			setTimeout(function(){
				admin.login(res.data.token,{ user:res.data }/* ,data.field.autoLogin != 'on' */);
				admin.navigate('/');
			},500)
		}).catch(function(res){})
       /* admin.get({
            api:'login',
            data:data.field,
            success:function(res){

                admin.login(res.data.token,{ user:res.data.user },data.field.autoLogin != 'on');
                admin.navigate('/');
            },
            complete:function(){
                //loading.hide();
            }
        }); */
        return false;
    })

})
</script>